//
//  ThirdModel.m
//  NewMusic
//
//  Created by chuxinyu123 on 15/11/23.
//  Copyright © 2015年 Going. All rights reserved.
//

#import "ThirdModel.h"
@implementation ThirdModel

- (instancetype)initWithDictionary:(NSDictionary *)dictionary
{
    self = [super init];
    if (self) {
        self.mvList = [NSMutableArray array];
        [self setValuesForKeysWithDictionary:dictionary];
    }
    return self;
}
+ (ThirdModel *)thirdModelWithDictionary:(NSDictionary *)dictionary
{
    ThirdModel *thirdModel = [[ThirdModel alloc] initWithDictionary:dictionary];
    return thirdModel;
}

- (void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    if ([key isEqual:@"id"]) {
        self.ID = [NSString stringWithFormat:@"%@", value];
    }
}

- (void)setValue:(id)value forKey:(NSString *)key
{
    if ([key isEqual:@"mvList"]) {
        for (NSDictionary *dic in value) {
            ThridDataModel *thrid = [ThridDataModel thridDataModelWithDictionary:dic];
            [self.mvList addObject:thrid];
        }
    }else{
        [super setValue:value forKey:key];
    }
}


@end
